package controllers

/* 
 * 公共结构体
 * author cameron
 */

import (
	"github.com/astaxie/beego"
)

type BaseController struct{
	beego.Controller
	
	//判断登陆属性
	IsLogin bool
}

func (this *BaseController) Prepare() {
	username := this.GetSession("username")
	if username == nil {
		this.IsLogin = false
	} else {
		this.IsLogin = true
		//输出用户名，进行用户登陆判断
		this.Data["username"] = username
	}
}